Object.prototype.stringify = function (startSeparator, type) {
    startSeparator = startSeparator || ['{', '}'];
    var str = startSeparator[0], separator = '';

    for (var i in this) {
        if (this[i] instanceof Object && typeof this[i] === 'object') {
            if (this[i] instanceof Array) {
                str += separator + '"' + i + '":' + jsonStringify(this[i], ['[', ']'], 'array');
            }
            else {
                str += separator + '"' + i + '":' + jsonStringify(this[i], null, 'object');
            }
        }
        else if (!(this[i] instanceof Function)) {
            if (type === 'array') {
                str += separator + '"' + this[i] + '"';
            }
            else {
                str += separator + '"' + i + '":"' + this[i] + '"';
            }
        }
        separator = ',';
    }

    return str + startSeparator[1];

	function jsonStringify (obj, startSeparator, type) {
	startSeparator = startSeparator || ['{','}'];
	var str = startSeparator[0], separator = '';

	for (var i in obj) {
		if (obj[i] instanceof Object && typeof obj[i] === 'object') {
		if (obj[i] instanceof Array) {
			str += separator + '"' + i + '":' + jsonStringify(obj[i], ['[',']'], 'array');
		}
		else {
			str += separator + '"' + i + '":' + jsonStringify(obj[i], null, 'object');
		}
		}
		else if (!(obj[i] instanceof Function)) {
		if (type === 'array') {
			str += separator + '"' + obj[i] + '"';
		}
		else {
			str += separator + '"' + i + '":"' + obj[i] + '"';
		}
		}
		separator = ',';
	}
	return str + startSeparator[1];
	}
};

